﻿<%@ Page Language="C#" MasterPageFile="~/Samples/Sample.Master" AutoEventWireup="true"
    CodeBehind="ClickAndFade.aspx.cs" Inherits="JQueryControlToolkit.Sample.Web.Samples.ClickAndFade"
    Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="body" runat="server">

    <script runat="server" type="text/C#">
        protected void Page_Load(object sender, EventArgs e)
        {
            JQueryControlToolkit.JQuery myJq = JQuery("#triggerLink").Click(
                JQuery("#greenDiv").FadeOut("normal").FadeIn("normal",
                    JQuery("#redDiv")
                        .SlideUp("normal")
                        .SlideDown("normal")
                        .SlideUp("normal")
                        .SlideDown("normal")
                )
            );

            JQueryControlToolkit.JQueryPageExtensions.Add(Page, myJq);
        }
    </script>

    <a id="triggerLink">Click to Fade and Slide</a>
    <br />
    <br />
    <div id="greenDiv" style="width: 80px; height: 80px; background-color: Green; float: left;
        margin-right: 1em">
        &nbsp;
    </div>
    <div id="redDiv" style="width: 80px; height: 80px; background-color: Red; float: left">
        &nbsp;
    </div>
    <br style="clear: both" />
    <br />
</asp:Content>
